package com.runen.wnhz.runen.presenter.model;

import com.runen.wnhz.runen.data.entity.BaseEntity;
import com.runen.wnhz.runen.data.entity.BaseUnified;
import com.runen.wnhz.runen.data.entity.MyOrderListBean;
import com.runen.wnhz.runen.service.MyOrderServiceApi;

import java.util.Map;

import rx.Observable;

/**
 * 描述：
 * 作者： 天天童话丶
 * 时间： 2018/6/1.
 */

public class MyOrderModel {

    MyOrderServiceApi mApi;

    public MyOrderModel(MyOrderServiceApi myOrderServiceApi) {
        this.mApi = myOrderServiceApi;
    }

    /**
     * 我的订单列表
     * @param map
     * @return
     */
    public Observable<BaseEntity<MyOrderListBean>> getMyOrderList(Map<String,String> map){
        return mApi.getMyOrderList(map);
    }

    /**
     * 取消订单
     * @param map
     * @return
     */
    public Observable<BaseUnified> cancelOrder(Map<String,String> map){
        return mApi.cancelOrder(map);
    }

}
